package OS.experiment12;

import java.awt.event.ActionEvent;
import java.awt.event.ActionListener;

public class ToastListener implements ActionListener {

    //两级回调，上级界面回调和当前提示界面回调
    private Callback callback, callback1;

    ToastListener(Callback callback, Callback callback1){
        this.callback = callback;
        this.callback1 = callback1;
    }

    @Override
    public void actionPerformed(ActionEvent e) {
        callback.schedule();
        callback1.schedule();
    }
}
